import {getDeviceInfo} from "~/utils/SystemUtil";

export const useSystemStore = defineStore('system', {
    state: () => ({
        initFlag: false,
        deviceInfo: {}
    }),
    persist: {
        storage: persistedState.localStorage,
    },
    actions: {
        async init() {
            if (process.client) {
                this.initFlag = true
                // @ts-ignore
                this.deviceInfo = getDeviceInfo()
            }
        }
    }
})